<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>HAI Backend API 服务</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            line-height: 1.6;
            margin: 0;
            padding: 20px;
            color: #333;
        }
        .container {
            max-width: 800px;
            margin: 0 auto;
            padding: 20px;
            border: 1px solid #ddd;
            border-radius: 5px;
            box-shadow: 0 0 10px rgba(0,0,0,0.1);
        }
        h1 {
            color: #2c3e50;
            border-bottom: 2px solid #3498db;
            padding-bottom: 10px;
        }
        h2 {
            color: #2980b9;
            margin-top: 20px;
        }
        ul {
            padding-left: 20px;
        }
        li {
            margin-bottom: 8px;
        }
        code {
            background-color: #f5f5f5;
            padding: 2px 4px;
            border-radius: 3px;
            font-family: monospace;
        }
        .endpoint {
            margin-bottom: 15px;
            padding: 10px;
            background-color: #f9f9f9;
            border-left: 4px solid #3498db;
        }
        .method {
            display: inline-block;
            padding: 3px 8px;
            border-radius: 3px;
            margin-right: 10px;
            font-weight: bold;
            color: white;
            background-color: #27ae60;
        }
        .method.post {
            background-color: #e67e22;
        }
        footer {
            margin-top: 30px;
            text-align: center;
            color: #7f8c8d;
            font-size: 0.9em;
        }
    </style>
</head>
<body>
    <div class="container">
        <h1>HAI Backend API 服务</h1>
        
        <p>这是一个基于 Spring Boot 和 MyBatis-Plus 的后端 API 服务。</p>
        
        <h2>API 接口列表</h2>
        
        <div class="endpoint">
            <div><span class="method">GET</span> <code>/api/v1/products</code></div>
            <p>获取产品列表，支持分页和按分类筛选</p>
            <p>可选参数：<code>category</code>、<code>page</code>、<code>pageSize</code></p>
        </div>
        
        <div class="endpoint">
            <div><span class="method">GET</span> <code>/api/v1/products/{id}</code></div>
            <p>获取指定产品的详细信息</p>
        </div>
        
        <div class="endpoint">
            <div><span class="method">GET</span> <code>/api/v1/creator-cards</code></div>
            <p>获取创作者卡片列表</p>
        </div>
        
        <div class="endpoint">
            <div><span class="method post">POST</span> <code>/api/v1/contact/forms</code></div>
            <p>提交联系表单</p>
            <p>必填参数：<code>name</code>、<code>email</code>、<code>message</code></p>
            <p>可选参数：<code>company</code>、<code>phone</code>、<code>subject</code>(默认值："网站咨询")</p>
        </div>
        
        <div class="endpoint">
            <div><span class="method">GET</span> <code>/api/v1/contact/configs</code></div>
            <p>获取联系方式配置</p>
        </div>
        
        <h2>健康检查</h2>
        <div class="endpoint">
            <div><span class="method">GET</span> <code>/health</code></div>
            <p>返回 API 服务健康状态</p>
        </div>
        
        <footer>
            <p>© 2025 HAI Backend API 服务</p>
        </footer>
    </div>
</body>
</html> 